package com.example.udpDemo.socket.design.singleton;

/**
 * @author wangdachuan
 * @version 1.0
 * @date 2023/4/6 00:16
 **/
public class Singleton02 {

    private static Singleton02 instance;

    public Singleton02() {
    }

    public static synchronized Singleton02 getInstance() {
        if(null == instance){
            instance = new Singleton02();
        }
        return instance;
    }
}
